<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<nav com="mySeparatePage" startPageRequestParam="startPage" maxDisplay="5" class="dataTables_paginate paging_bootstrap pagination" 
 style="text-align: center; width: 100%; "
>
	<ul class="pagination" style="margin: 0"></ul>
	
	<script com="myScript" appendTo="$$`ul" clear="true" type="text/x-jquery-tmpl">
		<li {{if current == true }}class="disabled"{{/if}} >
			<a {{if current == false }}index="{{:index}}"{{/if}} >首页</a>
		</li>
	</script>
	<script com="myScript" appendTo="$$`ul" clear="false" type="text/x-jquery-tmpl">
		<li {{if current == true }}	class="disabled" {{/if}} >
			<a {{if current == false }}index="{{:index}}"{{/if}} aria-label="Previous" ><span aria-hidden="true">&laquo;</span></a>
		</li>
	</script>
	<script com="myScript" appendTo="$$`ul" clear="false" type="text/x-jquery-tmpl">
		<li {{if current == true }}class="active"{{/if}} >
			<a {{if current == false }}index="{{:index}}"{{/if}} >{{:index+1}}</a>
		</li>
	</script>
	<script com="myScript" appendTo="$$`ul" clear="false" type="text/x-jquery-tmpl">
		<li {{if current == true }}	class="disabled" {{/if}} >
			<a {{if current == false }}index="{{:index}}"{{/if}} aria-label="Next" ><span aria-hidden="true">&raquo;</span></a>
		</li>
	</script>
	<script com="myScript" appendTo="$$`ul" clear="false" type="text/x-jquery-tmpl">
		<li {{if current == true }}	class="disabled" {{/if}} >
			<a {{if current == false }}index="{{:index}}"{{/if}}>尾页</a>
		</li>
		<li><a onclick="fun_pageJump(this)"><input type="number" min="1" style="width:80px;"/>跳转</a></li>
	</script>
</nav>

<script>
	function fun_pageJump(_this){
		var $this = $(_this);
		var val = $this.find("input").val();
		if(null===val || val.trim()===""){
			$this.removeAttr("index");
		}else{
			$this.attr("index", val-1);
		}
	}
</script>